# Contributor: Coco Liliace <coco@liliace.dev>
# Maintainer: Coco Liliace <coco@liliace.dev>
_pyname=jaraco.logging
pkgname=py3-$_pyname
pkgver=3.3.0
pkgrel=0
pkgdesc="Quickly solicit log level info from command-line parameters"
url="https://github.com/jaraco/jaraco.logging"
arch="noarch"
license="MIT"
depends="py3-tempora"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jaraco/jaraco.logging/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

_distname=".dist"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel --wheel-dir "$_distname" --output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer "$_distname"/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" "$_distname"/*.whl
}

sha512sums="
f3888ff2586e49d2ebea950d08114b8c32f3a41466cfd9c63f2df391ac5a16e41d777362395ebb7d498970fd39a8918479d19351984d8bdb280d86752fd1da58  py3-jaraco.logging-3.3.0.tar.gz
"
